package com.gy.hsim.bservice.message.bean;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 消息实体
 * @author David
 *
 */
public class Message{
	
	/**
	 * 流水id
	 */
	private long se_id;
	
	/**
	 * 发送用户，去除域名
	 */
	private String fromUid;
	
	/**
	 * 接收用户，去除域名
	 */
	private String toUid;
	
	/**
	 * 发送的消息体
	 */
	private String  message;
	
	/**
	 * 发送的消息内容
	 */
	private String  messageContent;
	
	/**
	 * 查询的消息关键字
	 */
	private String  messageKey;
	
	/**
	 * 发送时间
	 */
	private Date dateTime;
	
	/**
	 * 查询的时间类型: M:一个月,W:一周:,D:一天,R:自由输入时间
	 */
	private String dateQueryType;
	
	/**
	 * 发送时间字符串
	 */ 
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private String dateTimeStr;
	
	/**
	 * 页码（用于分页）
	 */
	private int pageNum;
	
	/**
	 * 每页显示数量（用于分页）
	 */
	private int pageSize;
	
	/**
	 * 开始索引（用于分页）
	 */
	private int startIndex;
	
	/**
	 * 结束索引（用于分页）
	 */
	private int endIndex;
		
	/**
	 * 查询开始时间（格式为yyyy-mm-dd）
	 */
	private String beginDate;
	
	/**
	 * 查询结束时间（格式为yyyy-mm-dd）
	 */
	private String endDate;
	
	/**
	 * 是否查询对话标识 Y:是,N:不是(如果是Y，查询两者之间的聊天信息，此时发送者fromUid和接受者toUid必填;如果是N，查询指定谁发给谁;默认为N。专门用于后台管理人员查询消息)
	 */
	private String dialogueFlag = "N";
	
	/**
	 * 消息业务类别-大类
	 */
	private String messageCode;
	
	/**
	 * 消息业务类别-子类
	 */
	private String subMessageCode;
	
	/**
	 * 最近联系人数量
	 */
	private int recentContactsNum;
	
	/**
	 * 查询方是否企业操作员,N不是,Y是
	 */
	private String ifOperator;
	
	/**
	 * 查询对象类型,e企业操作员，c消费者
	 * 
	 */
	private String targetUserType;
	
	/**
	 * 发送方昵称
	 * 
	 */
	private String senderNickName;
	
	/**
	 * 接收方昵称
	 * 
	 */
	private String receiverNickName;
	
	public String getMessageCode() {
		return messageCode;
	}

	public void setMessageCode(String messageCode) {
		this.messageCode = messageCode;
	}

	public String getSubMessageCode() {
		return subMessageCode;
	}

	public void setSubMessageCode(String subMessageCode) {
		this.subMessageCode = subMessageCode;
	}

	public String getMessageContent() {
		return messageContent;
	}

	public void setMessageContent(String messageContent) {
		this.messageContent = messageContent;
	}

	public String getDialogueFlag() {
		return dialogueFlag;
	}

	public void setDialogueFlag(String dialogueFlag) {
		this.dialogueFlag = dialogueFlag;
	}

	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public int getStartIndex() {
		return startIndex;
	}

	public void setStartIndex(int startIndex) {
		this.startIndex = startIndex;
	}

	public int getEndIndex() {
		return endIndex;
	}

	public void setEndIndex(int endIndex) {
		this.endIndex = endIndex;
	}

	public int getPageNum() {
		return pageNum;
	}

	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
		
	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public String getDateQueryType() {
		return dateQueryType;
	}

	public void setDateQueryType(String dateQueryType) {
		this.dateQueryType = dateQueryType;
	}

	public String getDateTimeStr() {
		return dateTimeStr;
	}

	public void setDateTimeStr(String dateTimeStr) {
		this.dateTimeStr = dateTimeStr.substring(0,dateTimeStr.lastIndexOf("."));
	}

	public long getSe_id() {
		return se_id;
	}
		
	public void setSe_id(long se_id) {
		this.se_id = se_id;
	}
			
	public String getFromUid() {
		return fromUid;
	}

	public void setFromUid(String fromUid) {
		this.fromUid = fromUid;
	}

	public String getToUid() {
		return toUid;
	}

	public void setToUid(String toUid) {
		this.toUid = toUid;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
		
	public String getMessageKey() {
		return messageKey;
	}

	public void setMessageKey(String messageKey) {
		this.messageKey = messageKey;
	}

	public Date getDateTime() {
		return dateTime;
	}

	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}
	
	public String getIfOperator() {
		return ifOperator;
	}

	public void setIfOperator(String ifOperator) {
		this.ifOperator = ifOperator;
	}

	public int getRecentContactsNum() {
		return recentContactsNum;
	}

	public void setRecentContactsNum(int recentContactsNum) {
		this.recentContactsNum = recentContactsNum;
	}
	
	public String getSenderNickName() {
		return senderNickName;
	}

	public void setSenderNickName(String senderNickName) {
		this.senderNickName = senderNickName;
	}

	public String getReceiverNickName() {
		return receiverNickName;
	}

	public void setReceiverNickName(String receiverNickName) {
		this.receiverNickName = receiverNickName;
	}

	public String getTargetUserType() {
		return targetUserType;
	}

	public void setTargetUserType(String targetUserType) {
		this.targetUserType = targetUserType;
	}
		
		
}
